package cn.tedu._03vehicle.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.NonNull;

@Data
public class UserRegParam {
//    @NotNull(message = "用户名不能为空")
    @Size(min = 2,max = 5,message = "请输入2-5位的用户名")
    @Schema(description = "用户名",required = true)
    private String username;
    @Pattern(regexp = "^(?!.*[\\s\\u4e00-\\u9fa5])(?=.*[a-zA-Z\\d])(?=.*[\\W_]|.*\\d.*[a-zA-Z]|.*[a-zA-Z].*\\d)[\\x21-\\x7e]{8,14}$",
            message="非法格式")
    @Schema(description = "密码",required = true)
    private String password;
    @Schema(description = "邮箱",required = true)
    @Email(message = "邮箱格式错误")
    private String email;
    @Schema(description = "电话",required = true)
    private String phone;
}
